Skip to content

CI: run optional backend tests on pull requests - #977

Merged
jeongyoonlee merged 3 commits into
uber:masterfrom
mohsinm-dev:fix/960-optional-backend-ci
Aug 1, 2026
Merged

CI: run optional backend tests on pull requests#977
jeongyoonlee merged 3 commits into
uber:masterfrom
mohsinm-dev:fix/960-optional-backend-ci

Conversation

@mohsinm-dev

Copy link
Copy Markdown
Contributor

Summary

  • add isolated TensorFlow, PyTorch, JAX, and JAX-PyTorch parity jobs for Python 3.11 and 3.12
  • install CPU-only PyTorch in CI and keep the existing from-source workflow focused on environment smoke testing
  • repair and reduce the stale PyTorch CEVAE test so the newly enforced lane starts green

Tests

  • pre-commit hooks: YAML, EOF, trailing whitespace, Black
  • actionlint .github/workflows/optional-backend-tests.yml
  • TensorFlow: 1 passed
  • PyTorch: 1 passed
  • JAX: 6 passed
  • JAX-PyTorch parity: 1 passed
  • verified marker collection selects 1 TF, 1 PyTorch, 6 JAX-only, and 1 parity test

Dependencies

  • no package dependency changes
  • CI uses the official PyTorch CPU wheel index to avoid CUDA packages on CPU runners

Closes #960

@jeongyoonlee jeongyoonlee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Parity lane pins test-path: tests/test_jax_cevae.py, so a future test marked both jax and torch in any other file gets deselected by both single-backend lanes and runs nowhere — set it to tests/, since -m "jax and torch" already scopes it.
  • Use RANDOM_SEED from tests/const.py in tests/test_cevae.py (from .const import RANDOM_SEED) instead of the literal 0 for both seed calls — it's 42, so please confirm the pytorch lane stays green.

Copy link
Copy Markdown
Contributor Author

Addressed both points:

  • The JAX–PyTorch parity lane now scans tests/ and relies on the jax and torch marker for selection.
  • tests/test_cevae.py now uses the shared RANDOM_SEED for both NumPy and PyTorch.

The complete optional-backend matrix passes on Python 3.11 and 3.12, including both PyTorch and parity lanes.

@jeongyoonlee
jeongyoonlee self-requested a review August 1, 2026 04:59

@jeongyoonlee jeongyoonlee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@jeongyoonlee
jeongyoonlee merged commit ec3c0d7 into uber:master Aug 1, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: optional-backend tests (TF/torch/JAX) are not run on PRs

2 participants